package main.constants;

import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Settings {
	
	static File file;
	
	public void loadSettings() {
		try {
			System.out.println("Loading settings...");
		Properties prop = new Properties();
		
		file = new File("settings.ini");
		FileReader reader = new FileReader(file);
		prop.load(reader);
		prop.getProperty("login_server", "crisi5x.no-ip.biz");
		} catch(IOException e) {
			e.printStackTrace();
		}
		
	}
	
	
	public void saveSettings() {
		try {
		file = new File("settings.ini");
		Properties prop = new Properties();
		FileWriter writer = new FileWriter(file);
		prop.store(writer, "Configured with: " + Constants.PRIBOT_VERSION);
		
	}
		catch(IOException e) {
			e.printStackTrace();
		}
	}
}
